Skip to content

Java reach: narrower initializer hop, platform boundaries, operator overloads - #1898

Merged
swapnilpaliwal-sd merged 2 commits into
apps/integration-0.1.9from
fix/java-reach-loop
Oct 10, 2026
Merged

swapnilpaliwal-sd merged 2 commits into
apps/integration-0.1.9from
fix/java-reach-loop

Conversation

@swapnilpaliwal-sd

@swapnilpaliwal-sd swapnilpaliwal-sd commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Java impact / path loop: precision of transitive reach.

Measured on 6 Java subjects (4 tune, 2 held-out), 50 targets each, against a runtime call oracle (test-suite trace). Work in progress: a compiler-resolved oracle is being added next; numbers below are runtime-truth only.

cfg split reach R reach P reach F callers F path F
none tune, before 0.991 0.245 0.393 0.534 0.923
none tune, after 0.990 0.275 0.431 0.578 0.923
none held-out, before 0.792 0.645 0.711 0.640 0.860
none held-out, after 0.787 0.664 0.720 0.641 0.860

Changes

  1. at load hop: a static initializer is reached from what initializes the type (new, static call, static field use, JLS 12.4.1); an instance initializer from the constructors. No defines hop out of an initializer.
  2. Engine: unstaged platform receivers (a pinned local of a platform type, a static call on a platform type name) are library boundaries, not unresolved sites.
  3. Overload resolution: numeric / boolean operator arguments rule out reference-typed overloads.

Cases (red on base, green after, each with a control): type-initializer-only-from-what-initializes-it, initializer-does-not-run-what-it-defines, platform-receiver-is-a-boundary, overload-by-operator-argument. Java case suite 354/354, engine suite (--oracle) 79/79; 13 goldens re-blessed (only ambiguous_unknown -> boundary_lib rows).

Fixes #1902 (closed by hand on merge: this PR targets the integration branch, so GitHub does not close them).

swapnilpaliwal-sd and others added 2 commits October 10, 2026 11:19
…operator arguments in overload choice

- impact: a type's static initializer is reached from what initializes the type (JLS 12.4.1: new, a static
  method call, a static field use); an instance initializer from the type's constructors. No `defines` hop
  out of an initializer: a lambda or anonymous class written in it is not run by it.
- engine: a pinned local of an unstaged platform type takes its declared type; a static call on an
  unstaged type name is a library boundary rather than an unresolved site.
- overload resolution: a numeric/boolean operator expression argument rules out reference-typed overloads.

Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
…/java-reach-loop

# Conflicts:
#	plugins/axiomcode/skills/axiomcode/scripts/axiomcode-impact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant